#include "widget.h"
#include "ui_widget.h"
#include <QDebug>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    //初始化第一个
    ui->lineEdit_name->setPlaceholderText("请输入账号");
    ui->lineEdit_name->setClearButtonEnabled(true);
    //初始化第二个输入框
    ui->lineEdit_password->setPlaceholderText("请输入密码");
    ui->lineEdit_password->setClearButtonEnabled(true);
    ui->lineEdit_password->setEchoMode(QLineEdit::Password);  //设置为显示密码形式
    //初始化第三个输入框
    ui->lineEdit_telephone->setPlaceholderText("请输入电话号码");
    ui->lineEdit_telephone->setClearButtonEnabled(true);
    ui->lineEdit_telephone->setInputMask("000-0000-0000");    //进行简单的校验
}

void Widget::on_pushButton_submit_clicked()
{
    //获取一下输入的内容，之后可以跟业务逻辑连接，处理输入的内容
}

Widget::~Widget()
{
    delete ui;
}



